<template>
         
    <el-table :data="list" style="width: 100%">
        <el-table-column prop="name" label="名称" width="150"/>
        <el-table-column prop="tel" label="电话" width="150">
           
        </el-table-column>
        <el-table-column prop="province" label="省" width="150"/>
        <el-table-column prop="city" label="城市" width="150"/>
        <el-table-column prop="county" label="县" width="150"/>
        <el-table-column prop="addressDetail" label="地址详细信息" width="150"/>
        <el-table-column prop="userid" label="标识" width="150"/>
        <el-table-column prop="status" label="状态" width="150"/>
        <el-table-column prop="proname" label="电子产品" width="150"/>
        <el-table-column prop="proid" label="编号" width="150"/>
        <el-table-column prop="originprice" label="价格" width="150">
        </el-table-column>
    </el-table>
    <el-table v-loading="loading" :data="tableData" style="width: 100%">
    <el-table-column prop="date" label="Date" width="180" />
    <el-table-column prop="name" label="Name" width="180" />
    <el-table-column prop="address" label="Address" />
  </el-table>
</template>
  
<script lang="ts" setup>
import { reactive } from 'vue';

import service from '../../../utils/service';
import { ref } from 'vue'

const loading = ref(true)

const tableData = [
  {
    date: '2016-05-02',
    name: 'John Smith',
    address: 'No.1518,  Jinshajiang Road, Putuo District',
  },
  {
    date: '2016-05-04',
    name: 'John Smith',
    address: 'No.1518,  Jinshajiang Road, Putuo District',
  },
  {
    date: '2016-05-01',
    name: 'John Smith',
    address: 'No.1518,  Jinshajiang Road, Putuo District',
  },
]
//搜索
const list = reactive<IGoods[]>([]);
const getCategory =()=>{
    service({
        url:"/order/list",
        method: "get",
    }).then((res)=>{
        if(res.data.code==="200"){
            list.length = 0
            list.push(...res.data.data)
        }
    })
}
getCategory();
// 定义查询结果
interface IGoods {
    name: string,
    tel: number,
    province: string,
    city: string,
    county: string,
    addressDetail: string,
    userid: number,
    proname:string ,
    proid: string,
    originprice: number,
}
</script>
  
<style scoped>
body {
  margin: 0;
}
.example-showcase .el-loading-mask {
  z-index: 9;
}
</style>